#include "BasicReqHandler.h"
#include <QJsonObject>

bool BasicReqHandler::processCmd(const QJsonObject& cmdObj, const ReqInfo& reqinfo, bool unReg /*= false*/)
{
	QString cmd = cmdObj["type"].toString();
	if (cmd == "tds.req.system.language.info")
	{
        emit sendDataToWeb(reqinfo.m_frameId, reqinfo.m_sid, "{\"finish\":1,\"language\":\"chinese\"}", reqinfo.m_jsCb);
    } else if (cmd == "tds.push.system.state")
    {
        emit sendDataToWeb(reqinfo.m_frameId, reqinfo.m_sid, "{\"finish\":1,\"login\": 2}", reqinfo.m_jsCb);
    }

	return true;
}
